package com.rodrigo.service;

import java.util.List;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.rodrigo.dao.TimeDAO;
import com.rodrigo.model.Time;

@Service
@Transactional
public class TimeServiceImpl implements TimeService {
	@Autowired
	private TimeDAO timeDAO;

	public void addTime(Time time) {
		timeDAO.addTime(time);		
	}

	public void updateTime(Time time) {
		timeDAO.updateTime(time);
	}

	public Time getTime(int id) {
		return timeDAO.getTime(id);
	}

	public void deleteTime(int id) {
		timeDAO.deleteTime(id);
	}

	public List<Time> getTimes() {
		return timeDAO.getTimes();
	}

}
